import api from "../api.js" //先导入封装好的

//查看地址列表
const list = async (param) => {
	console.log("进入方法---", param);
	let data = await api.api({
		url: '/jeecg-boot/api/adopt/addresses/list',
		data: param
	})
	return data
}
//新增地址
const add = async (param) => {
	console.log("进入方法---", param);
	let data = await api.api({
		url: '/jeecg-boot/api/adopt/addresses/add',
		method: "POST",
		data: param
	})
	return data
}
//修改地址
const update = async (param) => {
	console.log("进入方法---", param);
	let data = await api.api({
		url: '/jeecg-boot/api/adopt/addresses/update',
		method: "PUT",
		data: param
	})
	return data
}
//删除用户地址列表
const addressesDelete = async (param) => { 
	console.log("进入方法---", param);
	let data = await api.api({
		url: '/jeecg-boot/api/adopt/addresses/delete',
		method:"DELETE",
		type:"application/x-www-form-urlencoded",
		data: param
	})
	return data
}
export {
	list,
	add,
	update,
	addressesDelete
}